package com.travel.modules.asset.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.travel.commons.validator.groups.AddGroup;
import com.travel.commons.validator.groups.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * null
 * @TableName advertise
 */
@Data
@TableName("advertise")
public class Advertise implements Serializable {
    /**
     *
     */
    private Integer id;

    /**
     * 广告编号
     */
    @NotBlank(message = "id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String adId;

    /**
     * 商品id
     */
    private String goodsId;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    /**
     * 投放商id
     */
    private Integer userId;
    @TableField(exist = false)
    private String loginName;
    @TableField(exist = false)
    private Integer roleId;
    @TableField(exist = false)
    private String username;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String content;

    /**
     * 图片url
     */
    private String pic;

    /**
     * 状态，0-未审核，1-审核通过，2-已撤销
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 过期时间
     */
    private Date expireTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table advertise
     */
    private static final long serialVersionUID = 1L;
}